package com.rftennis.web.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.rftennis.dto.ItemResult;
import com.rftennis.dto.JSONResponce;
import com.rftennis.dto.QueryResult;
import com.rftennis.entity.OrderEntity;
import com.rftennis.entity.OrderItemEntity;
import com.rftennis.service.OrderItemService;
import com.rftennis.vo.OrderItemVo;
import com.rftennis.vo.OrderVo;

import lombok.NonNull;

@Controller
public class OrderItemController {
	@Autowired
	OrderItemService service;
	@GetMapping("/orderItem/select.do")
	public @ResponseBody JSONResponce  selectOrderItem(String orderId) throws Exception {
		ItemResult<OrderItemEntity> result=service.selectOrderItem(orderId);
		ItemResult<OrderItemVo> ItemVoResult=result.rowsMap(OrderItemVo::of);
      return JSONResponce.ok(ItemVoResult);

	}
}
